#ifndef ARRAY_H
#define ARRAY_H

#include <stdio.h>
#include <stdlib.h>

#define DEFAULT_ARRAY_SIZE 20

typedef struct Array
{
    int num_elements;
    int max_size;
    double *elements;
} Array;

Array* create_array();

double get_element(Array *ay, int index);

void push_back(Array *ay, double value); 

void free_array(Array *ay);

int compar (const void * elem1, const void * elem2);

void sort_elements(Array *ay);

void compute_statistics
(
    Array *ay, 
    double *median,
    double *average,
    double *min,
    double *max
);


#endif

